package com.luohh.treeroom.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.luohh.treeroom.dto.BasePageResult;
import com.luohh.treeroom.dto.BaseResult;
import com.luohh.treeroom.entity.Ad;
import com.luohh.treeroom.service.IAdService;
import com.luohh.treeroom.service.impl.AdServiceImpl;
import com.luohh.treeroom.util.JsonObjUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 罗辉煌
 * @since 2020-02-18
 */
@Api(value = "广告")
@RestController
@RequestMapping("/ad")
public class AdController {

    @Autowired
    IAdService adService;

    @ApiOperation(value = "查询广告")
    @RequestMapping("/getAdlist")
    public BaseResult<BasePageResult<Ad>>  getList()throws Exception{

        return adService.getAdList();
    }
}

